package com.mao.javabean;

public class StudentOperator {
    // 提供方法，打印学生总成绩
    public void printAllScore(Student student){
        double chinese = student.getChinese();
        double math = student.getMath();
        double allScore = chinese + math;
        System.out.println("学生总成绩为："+allScore);
    }
    // 提供方法，打印学生平均成绩
    public void printAverage(Student student){
        double chinese = student.getChinese();
        double math = student.getMath();
        double average = (chinese + math) / 2;
        System.out.println("学生平均成绩为："+average);
    }
}
